/*
 * Copyright (c) 2011 Jean-Marc Perronne
 * Ensisa, 12 rue des Freres Lumieres, F-68093 Mulhouse cedex
 * All rights reserved.
 *
 * The copyright of this software is owned by Werner Randelshofer. 
 * You may not use, copy or modify this software, except in  
 * accordance with the license agreement you entered into with  
 * Jean-Marc Perronne. For details see accompanying license terms. 
 */

package fr.uha.ensisa.jmp.drone.ui.instrument;

import fr.uha.ensisa.jmp.drone.ui.instrument.dial.CompoundDial;
import fr.uha.ensisa.jmp.drone.ui.instrument.dial.model.DefaultDialModel;
import fr.uha.ensisa.jmp.drone.ui.instrument.dial.model.DialModel;

public class Horizon extends CompoundDial
{
	
	public Horizon(String planePicturePath)
	{
		DialModel m = new DefaultDialModel(0,-180, 180);
		m.addChangeListener(this.changeListener);
		this.getModel().addModel("roll", m);
		
		m = new DefaultDialModel(0,-90, 90);
		m.addChangeListener(this.changeListener);
		this.getModel().addModel("pitch", m);
		
		this.getModel().setMajorTickSpacing("pitch", 10);
		this.getModel().setMinorTickSpacing("pitch", 5);
		this.setRenderer(new HorizonRenderer(this,planePicturePath));
	}
}
